home
***
CD-ROM
|
disk
|
FTP
|
other
***
search
/
Amiga Plus 2004 #11
/
Amiga Plus CD - 2004 - No. 11.iso
/
AmiSoft
/
Comm
/
irc
/
BlackIRC-FW.lha
/
BlackIRC
/
Rexx
/
Friendlybot.birx
next >
Wrap
Text File
|
1999-01-31
|
3KB
|
101 lines
/* Friendly bot script for BlackIRC
© 1998-99 by Felix Schwarz
*/
options results
failat 21
'ECHO <<FriendlyBot>> 2Welcome!!'
'ECHO <<FriendlyBot>> 2You just started FriendlyBot. o[0]It is watching what is'
'ECHO <<FriendlyBot>> 2told on IRC and telling rude people to stop being rude :)'
'ECHO <<FriendlyBot>> 2This can lead to quite funny discussions :-)'
GETLASTLINE
llorig=result
exit=0
rudelist=' '
REXXLINE ON
REXXLINETEXT 'FriendlyBot'
DO WHILE exit=0
GETENTERLINE
action=result
IF action='QUITBOT' THEN DO
exit=1
END
oldllorig=llorig
GETLASTLINE
llorig=result
IF llorig~=oldllorig THEN DO
rude=0
ll=Upper(llorig)
GETMYNICK
mynick=result
/* Say rude people, that they are rude ..*/
IF INDEX(ll,'PRIVMSG')>0 THEN DO
/* Check for rude expressions */
IF INDEX(ll,'SUCK')>0 THEN rude=1
IF INDEX(ll,'ASSHOLE')>0 THEN rude=1
IF INDEX(ll,'IDIOT')>0 THEN rude=1
IF INDEX(ll,'SHIT')>0 THEN rude=1
IF INDEX(ll,'BILL GATES')>0 THEN rude=1
IF INDEX(ll,'SUCKER')>0 THEN rude=1
IF INDEX(ll,'CRAP')>0 THEN rude=1
IF INDEX(ll,'FUCK')>0 THEN rude=1
IF rude=1 THEN DO
GETLASTNICK
fnick=result
'SAY /msg 'fnick' Hey 'fnick', don`t use such rude words!! (A message by FriendlyBot :)'
rudelist=rudelist' 'fnick
'COUNTUSAGE 'fnick' 'rudelist
times=result
if times>5 then do
'SAY /KICK 'fnick' Stop insulting! (FriendlyBot)'
end
END
IF INDEX(ll,Upper(mynick))>0 THEN DO
IF INDEX(ll,'#')=0 THEN DO
GETLASTNICK
fnick=result
GETAWAYSTATE
ast=rc
IF ast=5 THEN DO
'SAY /msg 'fnick' 'mynick' currently is away from keyboard but FriendlyBot is there for you :)'
END
END
END
END
/* Auto-greet feature */
IF INDEX(llorig,'JOIN')>0 THEN DO
GETLASTNICK
fnick=result
tochan=DelStr(llorig,1,INDEX(llorig,":",7))
'SAY /msg 'tochan' Hi 'fnick' !'
END
END
END
REXXLINE OFF
'ECHO <<FriendlyBot>> FriendlyBot quit..'
EXIT